/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xml.validator;

import java.net.URI;
import java.net.URISyntaxException;

/**
 *
 * @author marya
 */
public class URIValidator extends AbstractValidator{


    public URIValidator() {
        super();
    }

    public boolean isValid(String uri){
        boolean result = false;
        try{
            new URI(uri);
            result = true;
        }catch(URISyntaxException e){
            this.addMessage(uri+" is not a valid URI");
        }
        return result;
    }



}
